package cn.com.chengq.classloader;

public class NetworkClassLoader extends ClassLoader {
    private String host;
    private int port;

    @Override
    protected Class<?> findClass(String name) throws ClassNotFoundException {
        byte[] b = loadClassData(name);
        if (b == null || b.length == 0) {
            throw new ClassNotFoundException(name);
        }
        return defineClass(name, b, 0 , b.length);
    }

    private byte[] loadClassData(String name) {
        return null;
    }

}
